class AddUserNameToUsers < ActiveRecord::Migration
=begin
1.添加字段user_name,禁止为空，唯一
=end
  def change
    add_column :users, :user_name, :string, null: :false
    add_index :users, :user_name, unique: true
  end
end
